package com.cc.pms.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cc.pms.domain.Team;
import com.cc.pms.domain.vo.TeamVo;
import com.cc.common.core.domain.R;
import com.cc.common.core.page.PageQuery;
import com.cc.common.core.page.PageVo;

import java.util.List;

/**
 * <p>
 * 队伍表 服务类
 * </p>
 *
 * @author corleone
 * @since 2025-04-19
 */
public interface ITeamService extends IService<Team> {


    void init();


    PageVo<TeamVo> queryTeamVoPage(PageQuery query, Team team, String beginTime, String endTime);


    PageVo<TeamVo> queryMineManageTeamVoPage(PageQuery query , Team team);


    PageVo<TeamVo> queryTeamVoByTagIds(PageQuery query, List<Long> tagIds);


    PageVo<TeamVo> queryTeamVoByName(PageQuery query , String teamName);


    TeamVo queryTeamVoByInviteCode(String inviteCode);


    R<Long> create(Team team);

    R<Boolean> disbandTeam(Long teamId);

    R<Boolean> updateTeam(Team team);

    void updateTeamMembersCount(Long teamId , Integer currentMembers);

    void removeByTeamId(Long teamId);


    R<Long> joinEncryptionTeam(Team team);


    R<Long> joinPrivateTeam(Long teamId);


    PageVo<TeamVo> queryJoinTeamVoPage(PageQuery query, Team team);


    R<Long> joinTeamByInviteCode(Team team);
}
